package Elasticsearchs

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type InterviewEsRouter struct {
}

// InitInterviewEsRouter 初始化 interview表 路由信息
func (s *InterviewEsRouter) InitInterviewEsRouter(Router *gin.RouterGroup) {
	interviewEsRouter := Router.Group("interviewEs").Use(middleware.OperationRecord())
	interviewEsRouterWithoutRecord := Router.Group("interviewEs")
	var interviewEsApi = v1.ApiGroupApp.ElasticsearchsApiGroup.InterviewEsApi
	{
		interviewEsRouter.POST("createInterviewEs", interviewEsApi.CreateInterviewEs)             // 新建interview表
		interviewEsRouter.DELETE("deleteInterviewEs", interviewEsApi.DeleteInterviewEs)           // 删除interview表
		interviewEsRouter.DELETE("deleteInterviewEsByIds", interviewEsApi.DeleteInterviewEsByIds) // 批量删除interview表
		interviewEsRouter.PUT("updateInterviewEs", interviewEsApi.UpdateInterviewEs)              // 更新interview表
	}
	{
		interviewEsRouterWithoutRecord.GET("findInterviewEs", interviewEsApi.FindInterviewEs)       // 根据ID获取interview表
		interviewEsRouterWithoutRecord.GET("getInterviewEsList", interviewEsApi.GetInterviewEsList) // 获取interview表列表
	}
}
